#ifndef __LIB_PVR_CRYPTO_H__
#define __LIB_PVR_CRYPTO_H__

#include <sys_config.h>
#include <api/libpvr/lib_pvr_eng.h>

/* definition of invalid crypto values */
#define INVALID_CRYPTO_KEY_POS			0xff
#define INVALID_CRYPTO_STREAM_ID		0xff
#define INVALID_CRYPTO_STREAM_HANDLE	0xffffffff
#define INVALID_CRYPTO_MODE				0xffffffff

typedef struct
{
	UINT32	dmx_id;
	void   *decrypt_dev;		// DSC parse device
	UINT32 	decrypt_mode; 		// AES, DES, TDES, CSA
	UINT32	decrypt_stream_id;	// DSC parse stream ID
} dsc_parse_resource;
extern int pvr_crypto_init_ext(PVR_CRYPTO_MODE re_encrypt_mode, struct pvr_crypto_config * cfg);
extern int pvr_crypto_init(PVR_CRYPTO_MODE re_encrypt_mode);
extern int pvr_crypto_set_dsc_parse(dsc_parse_resource *dpr);

extern int pvr_crypto_rec_config(pvr_crypto_general_param *rec_param, dsc_parse_resource *dpr);
extern int pvr_crypto_playback_config(pvr_crypto_general_param *play_param);

extern int pvr_crypto_rec_stop(pvr_crypto_general_param *rec_param);
extern int pvr_crypto_playback_stop(pvr_crypto_general_param *play_param);

extern int pvr_crypto_generate_keys(pvr_crypto_key_param *key_param);

#endif /* __LIB_PVR_CRYPTO_H__ */

